package com.yimin.controller;

import com.yimin.eneity.EntitygenCodeUser; 
import com.yimin.eneity.mapper.MybatisServergenCodeUser; 


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("genCodeUser")
public class genCodeUserApiController {


   @Resource 
   MybatisServergenCodeUser mybatisServerImpgenCodeUser;


    @PostMapping("add")
    String add(@RequestBody EntitygenCodeUser entitygenCodeUser){
    mybatisServerImpgenCodeUser.AddgenCodeUser(entitygenCodeUser);

     return "增加成功";
    }
    @PostMapping("delete")
    String delete(@RequestBody EntitygenCodeUser entitygenCodeUser){
    mybatisServerImpgenCodeUser.DeletegenCodeUser(entitygenCodeUser);

     return "删除成功";
    }
    @PostMapping("update")
    String update(@RequestBody EntitygenCodeUser entitygenCodeUser){
    mybatisServerImpgenCodeUser.UpdategenCodeUser(entitygenCodeUser);

     return "修改成功";
    }
    @PostMapping("query")
    String query(@RequestBody EntitygenCodeUser entitygenCodeUser){
    return mybatisServerImpgenCodeUser.QuerygenCodeUser(entitygenCodeUser);

    }
}